Repository navigation
Check pull requests for edits to generated site files - #1288
LukasWallrich wants to merge 3 commits into
Conversation
|
👍 All image files/references (if any) are in webp format, in line with our policy. |
✅ Spell Check PassedNo spelling issues found when checking 4 changed file(s)! 🎉 |
|
✅ Staging Deployment Status This PR has been successfully deployed to staging as part of an aggregated deployment. Deployed at: 2026-11-28 12:00:11 UTC The staging site shows the combined state of all compatible open PRs. |
There was a problem hiding this comment.
3 issues found across 4 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="scripts/check_generated_paths.py">
<violation number="1" location="scripts/check_generated_paths.py:21">
P2: This check misses generated newsletter archives, allowing hand edits under `static/newsletters/` to bypass the guard even though the data workflow regenerates and overwrites them. Add `static/newsletters/` to the generated-path alternatives.</violation>
<violation number="2" location="scripts/check_generated_paths.py:23">
P2: The data rule incorrectly treats the hand-maintained lesson-plan data as generated. Exclude `lesson_plans.json` from this pattern so contributors can update the lesson-plan catalog.</violation>
</file>
<file name=".github/workflows/generated-paths.yaml">
<violation number="1" location=".github/workflows/generated-paths.yaml:39">
P1: This runs the checker from the untrusted PR tree, so a contributor can change `scripts/check_generated_paths.py` to ignore generated paths or always exit successfully. Run validation logic from a trusted base revision or keep the policy in a protected workflow/action instead.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| if: steps.exemption.outputs.exempt != 'true' | ||
| env: | ||
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | ||
| run: python3 scripts/check_generated_paths.py --base "$BASE_SHA" |
There was a problem hiding this comment.
P1: This runs the checker from the untrusted PR tree, so a contributor can change scripts/check_generated_paths.py to ignore generated paths or always exit successfully. Run validation logic from a trusted base revision or keep the policy in a protected workflow/action instead.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/generated-paths.yaml, line 39:
<comment>This runs the checker from the untrusted PR tree, so a contributor can change `scripts/check_generated_paths.py` to ignore generated paths or always exit successfully. Run validation logic from a trusted base revision or keep the policy in a protected workflow/action instead.</comment>
<file context>
@@ -0,0 +1,39 @@
+ if: steps.exemption.outputs.exempt != 'true'
+ env:
+ BASE_SHA: ${{ github.event.pull_request.base.sha }}
+ run: python3 scripts/check_generated_paths.py --base "$BASE_SHA"
</file context>
| r"|content/clusters/cluster-\d+/index\.md$" | ||
| r"|content/about/steering-committee/index\.md$" | ||
| r"|static/data/" | ||
| r"|static/partials/" |
There was a problem hiding this comment.
P2: This check misses generated newsletter archives, allowing hand edits under static/newsletters/ to bypass the guard even though the data workflow regenerates and overwrites them. Add static/newsletters/ to the generated-path alternatives.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At scripts/check_generated_paths.py, line 21:
<comment>This check misses generated newsletter archives, allowing hand edits under `static/newsletters/` to bypass the guard even though the data workflow regenerates and overwrites them. Add `static/newsletters/` to the generated-path alternatives.</comment>
<file context>
@@ -0,0 +1,82 @@
+ r"|content/clusters/cluster-\d+/index\.md$"
+ r"|content/about/steering-committee/index\.md$"
+ r"|static/data/"
+ r"|static/partials/"
+ r"|scripts/forrt_contribs/contributors_cache\.csv$"
+ r"|data/(?!partners\.json$|publications\.yaml$|themes/|fonts/)[^/]+$)"
</file context>
| r"|static/partials/" | |
| r"|static/partials/|static/newsletters/" |
| r"|static/data/" | ||
| r"|static/partials/" | ||
| r"|scripts/forrt_contribs/contributors_cache\.csv$" | ||
| r"|data/(?!partners\.json$|publications\.yaml$|themes/|fonts/)[^/]+$)" |
There was a problem hiding this comment.
P2: The data rule incorrectly treats the hand-maintained lesson-plan data as generated. Exclude lesson_plans.json from this pattern so contributors can update the lesson-plan catalog.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At scripts/check_generated_paths.py, line 23:
<comment>The data rule incorrectly treats the hand-maintained lesson-plan data as generated. Exclude `lesson_plans.json` from this pattern so contributors can update the lesson-plan catalog.</comment>
<file context>
@@ -0,0 +1,82 @@
+ r"|static/data/"
+ r"|static/partials/"
+ r"|scripts/forrt_contribs/contributors_cache\.csv$"
+ r"|data/(?!partners\.json$|publications\.yaml$|themes/|fonts/)[^/]+$)"
+)
+
</file context>
| r"|data/(?!partners\.json$|publications\.yaml$|themes/|fonts/)[^/]+$)" | |
| r"|data/(?!lesson_plans\.json$|partners\.json$|publications\.yaml$|themes/|fonts/)[^/]+$)" |
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="scripts/check_generated_paths.py">
<violation number="1" location="scripts/check_generated_paths.py:47">
P2: This guidance is incomplete for generated glossary references: those sources live in the Glossary BibTex Google Doc, not the term sheet, and `_create_glossaries.py` runs only with `regenerate_glossary=true`. Distinguish the two sources and tell contributors to manually dispatch `data-processing.yml` with that input.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| PATTERN_SOURCES = ( | ||
| (r"^data/(featured_resources|pub_cards|filter_tags)\.json$", "the recommendations or publications data used by scripts/build_featured_data.py"), | ||
| (r"^content/curated_resources/", "the curated resources Google Sheet, then run content/resources/resource.py"), | ||
| (r"^content/glossary/", "the glossary Google Sheet, then rerun glossary generation in the data-processing workflow"), |
There was a problem hiding this comment.
P2: This guidance is incomplete for generated glossary references: those sources live in the Glossary BibTex Google Doc, not the term sheet, and _create_glossaries.py runs only with regenerate_glossary=true. Distinguish the two sources and tell contributors to manually dispatch data-processing.yml with that input.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At scripts/check_generated_paths.py, line 47:
<comment>This guidance is incomplete for generated glossary references: those sources live in the Glossary BibTex Google Doc, not the term sheet, and `_create_glossaries.py` runs only with `regenerate_glossary=true`. Distinguish the two sources and tell contributors to manually dispatch `data-processing.yml` with that input.</comment>
<file context>
@@ -23,30 +23,39 @@
(r"^content/curated_resources/", "the curated resources Google Sheet, then run content/resources/resource.py"),
- (r"^content/glossary/", "the glossary Google Sheet, then run content/glossary/_create_glossaries.py and _build_references.py"),
- (r"^content/post/", "the announcements source used by scripts/create_announcements.R"),
+ (r"^content/glossary/", "the glossary Google Sheet, then rerun glossary generation in the data-processing workflow"),
+ (r"^content/post/", "the FORRT Announcements Google Sheet, then run scripts/create_announcements.R"),
+ (r"^content/contributor-analysis/(?!.*\.Rmd$)", "the Tenzing contributor sheets or the R Markdown under content/contributor-analysis, then rerun the data-processing workflow"),
</file context>
| (r"^content/glossary/", "the glossary Google Sheet, then rerun glossary generation in the data-processing workflow"), | |
| (r"^content/glossary/", "the Glossary Google Sheet for terms or the Glossary BibTex Google Doc for references, then manually dispatch data-processing.yml with regenerate_glossary=true"), |
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="scripts/check_generated_paths.py">
<violation number="1" location="scripts/check_generated_paths.py:29">
P3: The Games Portal mapping misses the checked-in `static/data/open_research_games.json` output, so edits to that generated file still receive only generic `AGENTS.md` guidance. Map both branch-specific output paths to their corresponding generators.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| # Includes the redesign's NEW_OUTPUTS and the summaries generator's output. | ||
| OUTPUT_SOURCES = { | ||
| "data/summaries.json": "the published FORRT summaries Google Doc, then run content/summaries/summaries.py", | ||
| "data/open_research_games.json": ( |
There was a problem hiding this comment.
P3: The Games Portal mapping misses the checked-in static/data/open_research_games.json output, so edits to that generated file still receive only generic AGENTS.md guidance. Map both branch-specific output paths to their corresponding generators.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At scripts/check_generated_paths.py, line 29:
<comment>The Games Portal mapping misses the checked-in `static/data/open_research_games.json` output, so edits to that generated file still receive only generic `AGENTS.md` guidance. Map both branch-specific output paths to their corresponding generators.</comment>
<file context>
@@ -23,30 +23,42 @@
OUTPUT_SOURCES = {
"data/summaries.json": "the published FORRT summaries Google Doc, then run content/summaries/summaries.py",
- "data/open_research_games.json": "the Games Portal source sheet, then run scripts/build_games_portal.py",
+ "data/open_research_games.json": (
+ "the Games Portal source sheet, then run scripts/build_games_portal.py on Doors "
+ "or scripts/open_research_games_portal/Open-Research-Games-Portal.R on main"
</file context>
Site generators overwrite hand edits to their outputs. This check flags those changes on PRs into
mainandrebrand-doors, using the merge base and the actual PR head. It points contributors to the generator or upstream source where known.Maintainers can apply
generated-outputto intentional regenerations. Adding or removing the label reruns the check. The data workflow’s same-repository glossary and Google Analytics PRs are exempt based on their verified author and branch names.Once this reaches
rebrand-doors,scripts/rebrand/check_source_rules.pyshould import the shared path list.Validated with actionlint and 68 unit tests. Tested the script against the summaries refresh (#1274), the automated glossary update (#1067) and the automated Analytics update (#936).
Created with GPT-6.2 Sol in Codex.
🤖 Generated with Claude Code